﻿using System;
using MongoDB.Bson;
using MongoDB.Driver;

namespace ZilLion.Service.Core.MongoDbManager.ObjectDb
{
    public interface IObjectDbRepository : IMongoDbRepository
    {
        void SaveObjectToMongoDb<T>(T item);

        void Insert<T>(T model) where T : IMongoModel;

        bool InsertWithexpire<T>(T model, TimeSpan expire) where T : IMongoModel;

        bool Delete<T>(T model) where T : IMongoModel;

        Q Find<Q>(IMongoQuery query) where Q : class;

        MongoCursor<BsonDocument> FindAll(IMongoQuery query);

        long Update<T>(T model) where T : IMongoModel;
    }
}